<template>
	<view class="com-content">
		<view class="com-box" v-if="popOrderStatu || propOrderStatu">
			<view class="com-box-cen" @click="todetail('0')">
				<view class="com-box-cen-num">{{obj.haveOrder}}</view>
				<view class="com-box-cen-txt">{{underway}}</view>
			</view>
			<view class="com-box-cen" @click="todetail('1')">
				<view class="com-box-cen-num">{{obj.waitOrder}}</view>
				<view class="com-box-cen-txt">{{approval}}</view>
			</view>
			<view class="com-box-cen" @click="todetail('3')">
				<view class="com-box-cen-num">{{obj.myOrder>99?99:obj.myOrder}}<text class="com-box-cen-num-add" v-if="obj.myOrder>99">+</text></view>
				<view class="com-box-cen-txt">{{myorder}}</view>
			</view>
			
		</view>
	</view>
</template>

<script>
	import {
			mapGetters,
			mapActions
		} from 'vuex';
	export default {
		name: 'sel-logo',
		props: {
			popOrderStatu:{
				type:Boolean,
				default:false
			},
			propOrderStatu:{
				type:Boolean,
				default:false
			},
			obj: {
				type: Object,
				default () {
					return {
						haveOrder: 3,
						waitOrder: 5,
						myOrder: 100,
					};
				}
			},
			underway:{
				type:String,
				default:'进行中'
			},
			approval:{
				type:String,
				default:'待审批'
			},
			myorder:{
				type:String,
				default:'我的下单'
			}
		},
		data() {
			return {
				
			}
		},
		computed: {
			...mapGetters(['userRole'])
		},
		methods: {
			todetail(e){
				this.$emit('todetail',e)
			}
		}
	}
</script>

<style lang="scss">
	.com-content{
		display: flex;
		.com-box{
			width: 100%;
			height: 190rpx;
			display: flex;
			align-items: center;
			border-radius: 10rpx;
			background: $uni-bg-color-gradient-three;
			color: $font-color-w;
			.com-box-cen{
				flex: 1;
				display: flex;
				flex-direction: column;
				align-items: center;
				.com-box-cen-num{
					position: relative;
					width: 100%;
					height: 100rpx;
					text-align: center;
					font-size: 80rpx;
					font-weight: 400;
					line-height: 80rpx;
					padding-bottom: 20rpx;
					border-right: 1rpx solid rgba(255,255,255,.5);
					.com-box-cen-num-add{
						position: absolute;
						top: -30rpx;
						font-size: 36rpx;
						font-weight: 600;
					}
				}
				.com-box-cen-num:last-of-type{
					border-right: none;
				}
				.com-box-cen-txt{
					font-size: 24rpx;
					font-weight: 400;
					line-height: 34rpx;
				}
				
			}
		}
	}
</style>
